extends ../../layout/index
block body
    +row
        +col('md',3)
            //- +message
            +well
                +button('primary','sm','创建新的版块','/content/forum/create').btn-block
                hr
                +button('default','sm','删除选中版块','javascript:document.forms[0].submit();').btn-block
        +col('md',9)
            +form('get','/content/forum/remove')
                +table('striped hover condensed')
                    thead
                        tr
                            td(width="50")
                                a(href="#",onclick='')
                            td(width="70") ID
                            td 标题
                            td(width="120") 状态
                            td(width="120") CD
                            td(width="200") 更新时间/发布时间
                            td(width="150") 操作
                    tbody
                        each item in data
                            tr
                                td
                                    input(type="checkbox",name='ids',value=item.id)
                                td
                                    a(href='/content/threads'+'?forum='+item.id)= item.id
                                td
                                    a(href='/content/threads'+'?forum='+item.id)= item.name
                                td
                                    if item.lock
                                        span.label.label-danger 锁定
                                    else
                                        span.label.label-success 正常
                                td
                                    = item.cooldown
                                td
                                    //- +time(item.createdAt)
                                    br
                                    font(color="#999999")
                                        //- +time(item.createdAt)
                                td
                                    a(href='/system/cache/flush?key=forum:'+item.id+':*') 清除该版块缓存
                                    | &nbsp;
                                    if item.lock
                                        a(href='/content/forum/'+item.id+'/set?key=lock&value=false') 解锁
                                    else
                                        a(href='/content/forum/'+item.id+'/set?key=lock&value=true') 锁定
                                    | &nbsp;
                                    a(href='/content/forum/'+item.id+'/update') 编辑
                                    | &nbsp;
                                    a(href='/content/forum/'+item.id+'/remove') 删除
